package edu.java.texbooks.tutorial.test02;

public class Test2{

    public static void main(String[] args) throws Exception{
	Book myBook= new Textbook();
	
	// test 01
	myBook.printInfo();
	System.out.println(myBook.getClass());
	System.out.println(((Object)myBook).getClass());
	System.out.println(((Object)myBook).getClass().getSimpleName());
	
	
	// test 02
//	Textbook tBook= new Textbook();
//	Textbook book2;
//	try{
//	    book2= (Textbook)(tBook.clone());
//	}
//	catch (CloneNotSupportedException e) {
//	    throw new CloneNotSupportedException();
//	}
//	
////	book2.setClassNumber(9);
//	System.out.println("tBook class number: "+ tBook.getClassNumber());
//	System.out.println("book2 class number: "+ book2.getClassNumber());
	
	// test 03
	Textbook tb01= new Textbook(123, 100, 12);
	Textbook tb02= new Textbook(123, 100, 12);
	
//	tb02.setClassNumber(13);
//	tb02.setCountPages(200);
	
	System.out.println("tb1 equals tb2 ?    " + tb01.equals(tb02));
    }

}
